#include<stdio.h>
int main(void)
{
    int i,j,k,p,count;
    char sign;

    

    i=j=k=p=0;

    for(count=0;count<10;count++){
        sign=getchar();
        if((sign>='A'&&sign<='Z')||(sign<='z'&&sign>='a'))
            i++;
            else
                if(sign==' '||sign=='\n')
                j++;
                    else if(sign>='0'&&sign<='9')
                        k++;
                            else
                                p++;


    }

    printf("Letter = %d, blank = %d, digit = %d, other = %d",i,j,k,p);

    return 0;
    
}